package com.best.service.impl;

import com.best.service.Person;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author Jiang Akang
 * employeeId: BG435424
 * @date 2021/5/29
 **/

//@Component("student")
public class StudentImpl implements Person {

    private String name;

    @Override
    public void sayHello() {
        System.out.println("Hello World, " + this.name);
    }

    @PostConstruct
    public void init() {
        this.name = "student";
    }

    @Override
    public String toString() {
        return "HelloWorldImpl{" +
                "name='" + name + '\'' +
                '}';
    }
}
